
const data = [
  {
    "id": 0,
    "name": "devin"
  },
  {
    "id": 1,
    "name": "hello"
  }
]

data.map(item => {
  if (item.id == 1) {
    console.log(item, '--')
    item = {
      ddd: 1
    }
  }
})
console.log(data, 'data')